Fix popover life-cycle handling
authorMatthias Clasen <mclasen@redhat.com>
Sat, 22 Feb 2014 03:08:00 +0000 (22:08 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 22 Feb 2014 03:08:00 +0000 (22:08 -0500)
commitb01229db4b1b4c0d0ea29f55be575da7dd57fda0
tree31a499ad751719831f69d9d917b3cfcb2980bc9d
parent00e87d24450821f980523b8e8d31064dd3feb131
Fix popover life-cycle handling

c28784524016b2a8eac18d5046ebc8cdaca7f9b0 was trying to fix
the memory leak caused by popovers begin destroyed in
gtk_window_destroy before chaining up to gtk_widget_destroy,
which unrealizes the window, and would clean up the popover
windows if the popovers were still around.

Fix this in a better way by moving the popover destruction
after the chaining up, so we unrealize first, and then
destroy the popovers.

Also, make _gtk_window_remove_popover unrealize the popover,
for symmetry with _gtk_window_add_popover.

This should fix
https://bugzilla.gnome.org/show_bug.cgi?id=724921
gtk/gtkwindow.c